package com.yeqian.attachment.enums;


public enum UploadTypeEnum  {

    FASTDFS("fastdfs", "fastDFS文件上传"),
    LOCAL("local", "存储本地服务器");
    private final String uploadType;
    private final String description;

    public String getUploadType() {
        return this.uploadType;
    }

    public String getDescription() {
        return this.description;
    }

    private UploadTypeEnum(String uploadType, String description) {
        this.uploadType = uploadType;
        this.description = description;
    }

    public static UploadTypeEnum getFileUploadType(String type) {
        UploadTypeEnum[] var1 = values();
        int var2 = var1.length;

        for(int i = 0; i < var2; ++i) {
            UploadTypeEnum fileUploadTypeEnum = var1[i];
            if (type.equals(fileUploadTypeEnum.getUploadType())) {
                return fileUploadTypeEnum;
            }
        }

        return LOCAL;
    }
}
